package com.czxy.service;

import com.czxy.dao.SpecificationMapper;
import com.czxy.pojo.Specification;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 规格选项Service
 * @author Liuyunqin 17674029449@163.com
 * @date 2018/12/25 15:10
 */
@Service
@Transactional
public class SpecificationService {
    @Autowired
    private SpecificationMapper specificationMapper;

    /**
     * 根据三级分类id查询对应的规格选项
     * @param catId
     * @return
     */
    public List<Specification> findSpecificationByCatId(Integer catId) {
        List<Specification> specofocationByCatId = specificationMapper.findSpecofocationByCatId(catId);
        return specofocationByCatId;
    }
}
